package com.aspose.cells;

class zbfm extends zck {
   private float k = 0.0F;
   private float l = 0.0F;

   zbfm(zn var1, float var2, float var3, zbkr var4) {
      super(var1, var2, var3, var4);
      if (!this.e.Q()) {
         this.e.f(180);
      } else {
         this.e.f(0);
      }

   }

   void b() {
      float var1 = this.e.s();
      float var2 = this.e.t();
      float var3 = this.e.q();
      float var4 = this.e.r();
      com.aspose.cells.b.a.b.zq var5 = new com.aspose.cells.b.a.b.zq(var1, var2, var3, var4);
      com.aspose.cells.b.a.b.a.ze var6 = new com.aspose.cells.b.a.b.a.ze();
      var6.b(var5);
      com.aspose.cells.b.a.b.zc var7 = zbum.a(this.e.w(), var6);
      com.aspose.cells.b.a.b.zm var8 = zbum.a(this.e.x());
      com.aspose.cells.b.a.b.a.ze var9 = this.a(var1, var2, var3, var4, 0);
      com.aspose.cells.b.a.b.a.ze var10 = this.a(var1, var2, var3, var4, 1);
      com.aspose.cells.b.a.b.a.ze var11 = this.a(var1, var2, var3, var4, 2);
      com.aspose.cells.b.a.b.a.ze var12 = this.a(var1, var2, var3, var4, 3);
      com.aspose.cells.b.a.b.a.ze var13 = this.a(var1, var2, var3, var4, 4);
      if (!this.e.w().a()) {
         this.a.a(var7, var9);
         this.a.a(var7, var10);
         this.a.a(var7, var11);
         this.a.a(var7, var12);
         this.a.a(var7, var13);
      }

      if (!this.e.x().a()) {
         this.a.a(var8, var9);
         this.a.a(var8, var10);
         this.a.a(var8, var11);
         this.a.a(var8, var12);
         this.a.a(var8, var13);
      }

      super.a();
   }

   public com.aspose.cells.b.a.b.a.ze a(float var1, float var2, float var3, float var4, int var5) {
      com.aspose.cells.b.a.b.a.ze var6 = new com.aspose.cells.b.a.b.a.ze();
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            this.l = this.e.r() * com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F;
            this.k = this.e.q() / 2.0F * com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 100000.0F;
         } else {
            this.l = this.e.r() * 16667.0F / 100000.0F;
            this.k = this.e.q() / 2.0F * 50000.0F / 100000.0F;
         }
      } else {
         this.l = this.e.r() * 16667.0F / 100000.0F;
         this.k = this.e.q() / 2.0F * 50000.0F / 100000.0F;
      }

      float var7 = var3 / 2.0F - this.k;
      float var8 = var4 - this.l;
      float var9 = var4 - var8;
      if (var5 == 0) {
         var6.a(var1 + var7, var2 + var8, 0.0555F * var3, var9 / 2.0F, 180.0F, 90.0F);
         var6.b(var1 + var7 + 0.0277F * var3, var2 + var8, var1 + var3 - 0.0277F * var3 - var7, var2 + var8);
         var6.a(var1 + var3 - 0.0555F * var3 - var7, var2 + var8, 0.0555F * var3, var9 / 2.0F, -90.0F, 90.0F);
         var6.j();
         var6.b(var1 + var3 - var7, var2 + var4 - 3.0F * var9 / 4.0F, var1 + var3 - var7, var2 + var9 / 4.0F);
         var6.a(var1 + var3 - 0.0555F * var3 - var7, var2, 0.0555F * var3, var9 / 2.0F, 0.0F, -90.0F);
         var6.b(var1 + var3 - var7 - 0.0277F * var3, var2, var1 + var7 + 0.0277F * var3, var2);
         var6.a(var1 + var7, var2, 0.0555F * var3, var9 / 2.0F, 270.0F, -90.0F);
         var6.b(var1 + var7, var2 + var9 / 4.0F, var1 + var7, var2 + var4 - 3.0F * var9 / 4.0F);
      } else if (var5 == 1) {
         var6.b(var1, var2 + var9, var1 + var7, var2 + var9);
         var6.b(var1 + var7, var2 + var9, var1 + var7, var2 + var4 - 3.0F * var9 / 4.0F);
         var6.a(var1 + var7, var2 + var8, 0.0555F * var3, var9 / 2.0F, 180.0F, -90.0F);
         var6.b(var1 + var7 + 0.0277F * var3, var2 + var4 - var9 / 2.0F, var1 + var7 + 0.1F * var3, var2 + var4 - var9 / 2.0F);
         var6.a(var1 + var7 + 0.0722F * var3, var2 + var8 + var9 / 2.0F, 0.0555F * var3, var9 / 2.0F, 270.0F, 180.0F);
         var6.b(var1, var2 + var4, var1 + 0.125F * var3, var2 + var9 + var8 / 2.0F);
         var6.b(var1 + 0.125F * var3, var2 + var9 + var8 / 2.0F, var1, var2 + var9);
         var6.i();
      } else if (var5 == 2) {
         var6.b(var1 + var3, var2 + var9, var1 + var3 - var7, var2 + var9);
         var6.b(var1 + var3 - var7, var2 + var9, var1 + var3 - var7, var2 + var4 - 3.0F * var9 / 4.0F);
         var6.a(var1 + var3 - 0.0555F * var3 - var7, var2 + var8, 0.0555F * var3, var9 / 2.0F, 0.0F, 90.0F);
         var6.a(var1 + var3 - var7 - 0.1277F * var3, var2 + var8 + var9 / 2.0F, 0.0555F * var3, var9 / 2.0F, 270.0F, -180.0F);
         var6.b(var1 + var3, var2 + var4, var1 + 0.875F * var3, var2 + var9 + var8 / 2.0F);
         var6.b(var1 + 0.875F * var3, var2 + var9 + var8 / 2.0F, var1 + var3, var2 + var9);
         var6.i();
      } else if (var5 == 3) {
         var6.a(var1 + var7, var2 + var8, 0.0555F * var3, var9 / 2.0F, 270.0F, -180.0F);
         var6.a(var1 + var7 + 0.0722F * var3, var2 + var8 + var9 / 2.0F, 0.0555F * var3, var9 / 2.0F, 270.0F, 90.0F);
         var6.j();
         var6.b(var1 + var7 + 0.1277F * var3, var2 + var4 - var9 / 4.0F, var1 + var7 + 0.1277F * var3, var2 + var8);
         var6.b(var1 + var7 + 0.1277F * var3, var2 + var8, var1 + var7 + 0.0277F * var3, var2 + var8);
      } else {
         var6.a(var1 + var3 - 0.0555F * var3 - var7, var2 + var8, 0.0555F * var3, var9 / 2.0F, 270.0F, 180.0F);
         var6.a(var1 + var3 - var7 - 0.1277F * var3, var2 + var8 + var9 / 2.0F, 0.0555F * var3, var9 / 2.0F, 270.0F, -90.0F);
         var6.j();
         var6.b(var1 + var3 - var7 - 0.1277F * var3, var2 + var4 - var9 / 4.0F, var1 + var3 - var7 - 0.1277F * var3, var2 + var8);
         var6.b(var1 + var3 - var7 - 0.1277F * var3, var2 + var8, var1 + var3 - var7 - 0.0277F * var3, var2 + var8);
      }

      return var6;
   }
}
